package com.itjeffrey.autocode.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itjeffrey.autocode.bo.req.RegisterBO;
import com.itjeffrey.autocode.common.Result;
import com.itjeffrey.autocode.entity.LoginInfoEntity;
import com.itjeffrey.autocode.bo.req.ModPwdBO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;


/**
 * @From: Jeffrey
 * @Date: 2020/11/30
 */
public interface LoginService extends IService<LoginInfoEntity> {

    Result login(String username, String password);

    Result modPwd(ModPwdBO modPwdBO);

    Result refreshToken(HttpServletRequest request, HttpServletResponse response);

    Result logout(HttpServletRequest request, HttpServletResponse response);

    Result register(RegisterBO registerBO);

    List<LoginInfoEntity> queryAllLoginInfo(String username);

    int deleteByUsername(String username);

    LoginInfoEntity queryOne(String loginname);
}
